package org.jspar.route;

import org.jspar.Constants;

public class TrailCost {

	public int length;
	public int lookaheadEstimate;
	public int cornerCount;
	public int congestionCost;

	public TrailCost(int length, int lookaheadEstimate, int cornerCount,
			int congestionCost) {
		this.length = length;
		this.lookaheadEstimate = lookaheadEstimate;
		this.cornerCount = cornerCount;
		this.congestionCost = congestionCost;
	}
	
	public int result() {
		return length * Constants.LENGTH_WEIGHT +  cornerCount * Constants.CORNER_COST + congestionCost;
	}

}
